<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta name="Description" content="Edit Offers">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="pragma" content="no-cache" />

    <meta name="description"
          content="<?php echo isset($this->pageDescription)?$this->pageDescription:$this->pageTitle;?>">
    <meta name="keywords"
          content="<?php echo isset($this->pageKeywords)?$this->pageKeywords:$this->pageTitle;?>">

    <title><?php echo CHtml::encode($this->pageTitle); ?></title>

    <?php $baseUrl = Yii::app()->request->baseUrl;?>
    <link rel="stylesheet"
          href="<?php echo "$baseUrl/jmobile/jquery.mobile-1.2.0.min.css"?>" />
    <script type="text/javascript"
            src="<?php echo "$baseUrl/jquery/jquery-1.7.1.min.js"?>"></script>
    <script type="text/javascript"
            src="<?php echo "$baseUrl/jmobile/jquery.mobile-1.2.0.min.js"?>"></script>
    <!-- This is our own css file to set font and all other non jquery icons. -->
    <link rel="stylesheet" type="text/css" href="<?php echo "$baseUrl/css/style.css"?>" />

    <!-- Import Date plugin Css and Javascripts-->
    <link href="<?php echo "$baseUrl/css/mobiscroll-2.0.3.custom.min.css"?>" rel="stylesheet" type="text/css" />
    <script src="<?php echo "$baseUrl/js/mobiscroll-2.0.3.custom.min.js"?>" type="text/javascript"></script>
    <script src="<?php echo "$baseUrl/js/swipe.js"?>" type="text/javascript"></script>

    <!-- These are all geo location related key and api -->
    <script src="<?php echo "$baseUrl/js/geoLocation.js"?>" type="text/javascript"></script>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=AIzaSyDNTVLvz-qPvfEfT2hv8HPk5aZOfLltmME" type="text/javascript"></script>


    <script src="<?php echo "$baseUrl/js/jquery.fileupload.js"?>" type="text/javascript"></script>
    <script src="<?php echo "$baseUrl/js/jquery.iframe-transport.js"?>" type="text/javascript"></script>
    <script src="<?php echo "$baseUrl/js/vendor/jquery.ui.widget.js"?>" type="text/javascript"></script>

    <!--
    don't need these
    or for performance reason, we can use this yii command to load javascript in different html page:
    Yii::app()->clientScript->registerScriptFile('somescript.js', CClientScript::POS_HEAD);
    <script type="text/javascript">google.load("jquery", "1"); google.load("jqueryui", "1");</script>
    <link href="http://code.google.com/apis/maps/documentation/javascript/examples/standard.css" rel="stylesheet" type="text/css" />
    -->
</head>

<!--Much as we might want to execute certain CSS for certain devices, we might also want to run jQuery only on specific devices. Here is an adaptation of some code from Snipplr that allows me to easily segment portions of jQuery to run depending on the user’s device.
var deviceAgent = navigator.userAgent.toLowerCase();
var agentID = deviceAgent.match(/(iphone|ipod|ipad|android)/);
if(agentID.indexOf("iphone")>=0){
alert("iphone");
}
if(agentID.indexOf("ipod")>=0){
alert("ipod");
}
if(agentID.indexOf("ipad")>=0){
alert("ipad");
}
if(agentID.indexOf("android")>=0){
alert("android");
}
 $baseUrl = Yii::app()->request->baseUrl;
    Yii::app()->clientScript->registerScriptFile($baseUrl.'/js/jquery.fileupload.js', CClientScript::POS_BEGIN);
    Yii::app()->clientScript->registerScriptFile($baseUrl.'/js/jquery.iframe-transport.js', CClientScript::POS_BEGIN);
    Yii::app()->clientScript->registerScriptFile($baseUrl.'/js/vendor/jquery.ui.widget.js', CClientScript::POS_BEGIN);
    Yii::app()->clientScript->registerScriptFile($baseUrl.'/js/ini-upload.js', CClientScript::POS_BEGIN);

 -->


<body class="ui-mobile-viewport" >

<?php echo $content; ?>

</body>
</html>


